while True:
    print("PS:在\"名字\"中输入break结束!")
    print("   价格填错时可使用\"FFFFF\"来取消写入！\n")
    zu=input("请输入合成组名(不知道请填A):").upper()
    name=input("请输入名字:")
    if(name=="break"):
        break
    if(name==""):
        print("请重新输入\n")
        continue
    jg=[]
    jg.append("\""+name.upper()+"\"")
    jg.append(input("请输入破损不堪价格:"))
    jg.append(input("请输入战痕累累价格:"))
    jg.append(input("请输入久经沙场价格:"))
    jg.append(input("请输入略有磨损价格:"))
    jg.append(input("请输入崭新出厂价格:"))
    jg=str(jg).replace("''","\"no\"").replace(" ","").strip("[]").replace("'","")
    print(jg)
    if(jg=="\""+name+"\""+",no,no,no,no,no"):
        print("请重新输入\n")
        continue
    if "FFFFF" in jg:
        print("已停止,未写入\n")
        continue
    last=1
    try:
        with open("jgb"+zu+".txt","r") as f:
            last=int(list(f.readlines()[-1])[1])+1
    except:
        ''
    txt=zu+str(last)+"="+"["+jg+"]"+"\n"
    print(txt.replace("\"",""))
    f1=open("jgb"+zu+".txt","a")
    f1.write(txt)
    f1.close()
    print("已写入\n")
        
